Handling out-of-order data during stream processing and persisting it in a temporal graph database

ABSTRACT

The present technology addresses deficiencies associated with common practices for handling out of order data in a streaming data database. An aspect of the present technology is avoid storing out of order data in a snapshot but just store the out of order data as additional data linked to the temporal graph. The present technology receives out of order data and records a modification time for the data and a next modification time for the data that equals a timestamp of data previously stored in the database. If there is also data in the database for a time earlier than the timestamp of the out of order data, the earlier data is adjusted so that its next modification time matches the timestamp of the out of order data.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority to Indian application number202041036949, filed on Aug. 27, 2020, the content of which isincorporated herein by reference in its entirety.

TECHNICAL FIELD

The present technology pertains to handling out of order data in anetwork log and, more particularly, to managing out of order packets ina network environment that are recorded in a temporal graph.

BACKGROUND

A temporal graph of a network stores graph elements, pertaining tonetwork data flowing in the network, as vertices and as edges. Thetemporal graph stores all changes made to the network data as historyand the temporal graph is capable of providing a snapshot of networkdata at any given point in time.

A temporal graph is ideal for storing data of a network such as acomputer network. The temporal graph can be used to study over-time howdata of the network is changing. For example, a temporal graph can beused to analyze usage in the computer network and to study trafficpatterns in the computer network. The temporal graph can store differentinformation such as information pertaining to users connected to thecomputer network, users logging out of the computer network, devices inthe computer network to which users are connecting or disconnecting,devices in the computer network, applications run in the computernetwork, traffic and bandwidth handled by each network device in thecomputer network, etc.

BRIEF DESCRIPTION OF THE FIGURES

To provide a more complete understanding of the present disclosure andfeatures and advantages thereof, reference is made to the followingdescription, taken in conjunction with the accompanying drawings, inwhich:

FIG. 1 illustrates example embodiments of insertion scenarios for newdata in accordance with some aspects of present technology;

FIG. 2 illustrates an example embodiment for a completed insertion ofnew data in accordance with some aspects of present technology;

FIG. 3 illustrates an example method embodiment for inserting new datain a temporal graph in accordance with some aspects of presenttechnology;

FIG. 4 illustrates an example of a networking device in accordance withsome aspects of present technology; and

FIG. 5 illustrates an example of a computing system in accordance withsome aspects of present technology.

DETAILED DESCRIPTION OF EXAMPLE EMBODIMENTS

Various embodiments of the disclosure are discussed in detail below.While specific implementations are discussed, it should be understoodthat this is done for illustration purposes only. A person skilled inthe relevant art will recognize that other components and configurationsmay be used without parting from the spirit and scope of the disclosure.Thus, the following description and drawings are illustrative and arenot to be construed as limiting. Numerous specific details are describedto provide a thorough understanding of the disclosure. However, incertain instances, well-known or conventional details are not describedin order to avoid obscuring the description. References to one or anembodiment in the present disclosure can be references to the sameembodiment or any embodiment; and, such references mean at least one ofthe embodiments.

Reference to “one embodiment” or “an embodiment” means that a particularfeature, structure, or characteristic described in connection with theembodiment is included in at least one embodiment of the disclosure. Theappearances of the phrase “in one embodiment” in various places in thespecification are not necessarily all referring to the same embodiment,nor are separate or alternative embodiments mutually exclusive of otherembodiments. Moreover, various features are described which may beexhibited by some embodiments and not by others.

The terms used in this specification generally have their ordinarymeanings in the art, within the context of the disclosure, and in thespecific context where each term is used. Alternative language andsynonyms may be used for any one or more of the terms discussed herein,and no special significance should be placed upon whether or not a termis elaborated or discussed herein. In some cases, synonyms for certainterms are provided. A recital of one or more synonyms does not excludethe use of other synonyms. The use of examples anywhere in thisspecification including examples of any terms discussed herein isillustrative only, and is not intended to further limit the scope andmeaning of the disclosure or of any example term. Likewise, thedisclosure is not limited to various embodiments given in thisspecification.

Without intent to limit the scope of the disclosure, examples ofinstruments, apparatus, methods and their related results according tothe embodiments of the present disclosure are given below. Note thattitles or subtitles may be used in the examples for convenience of areader, which in no way should limit the scope of the disclosure. Unlessotherwise defined, technical and scientific terms used herein have themeaning as commonly understood by one of ordinary skill in the art towhich this disclosure pertains. In the case of conflict, the presentdocument, including definitions will control.

Additional features and advantages of the disclosure will be set forthin the description which follows, and in part will be obvious from thedescription, or can be learned by practice of the herein disclosedprinciples. The features and advantages of the disclosure can berealized and obtained by means of the instruments and combinationsparticularly pointed out in the appended claims. These and otherfeatures of the disclosure will become more fully apparent from thefollowing description and appended claims, or can be learned by thepractice of the principles set forth herein.

Overview

The present technology can include a system for storing data in atemporal graph. The system can include one or more processors and canstore computer readable instructions for causing the system to perform amethod of handling out of order data when it is received. For examplethe system can receive new data pertaining to a graph element in atemporal graph, the temporal graph comprising different types of graphelements including vertices and edges, for storing information of acomputer network.

The system can determine that the temporal graph already stores seconddata for the graph element having a timestamp denoting a second time,wherein the new data was recorded at a first time that is the same orearlier than the second time, and can insert the new data into thetemporal graph by recording data for the graph element in the temporalgraph database with a timestamp for the new data denoting the first timeand a next modification time for the new data that denotes the secondtime.

Further, the system can, prior to the insertion of the new data into thetemporal graph, determine that the temporal graph already stores thirddata for the graph element having a timestamp for the third datadenoting a third time and that has a next modification time for thethird data that denotes the second time, wherein the first time that isassociated with the new data is after the third time, but prior to thesecond time, and update the next modification time for the third data todenote the first time.

Further, when the system determines that the temporal graph alreadystores second data for the graph element having a timestamp denoting asecond time the system can further determine that the new data isearlier than any timestamp associated with data for the graph element inthe temporal graph.

Further, the system can receive a request to produce a snapshot of aportion of the temporal graph, wherein the request identifies one ormore data elements and a specified time for which to produce thesnapshot. In response, the system can search the temporal graph for alldata that has a modification time less than or equal to the specifiedtime coupled with a next modification time greater than the specifiedtime.

The system can also receive a request to produce a current snapshot of aportion of the temporal graph, wherein the request identifies one ormore data elements. In response, the system can search the temporalgraph for all data that has a next modification time set to the maximumvalue.

Detailed Description

In a streaming data network, data that needs to be stored arrives asunbounded streams. In order to store the data in a temporal graph of thestreaming data network, every data element of the data is assigned atimestamp. In such network, all the data elements of the data may notarrive in the increasing order of time. It is very common for the dataelements to arrive in any temporal order.

In handling timestamped data elements in the streaming data network, itcan be a problem to persist an out-of-order data element in the temporalgraph. If the out-of-order data element is just a metric of a device ata particular point in time such as memory usage, bandwidth usage,service request count, client count, etc., then handling theout-of-order data element can be done using commonly practiced methods.In this case, handling the out-of-order data element is performed byadding one independent record to the temporal graph containing thedevice ID, timestamp, the metric type, and the metric data. Since theout-of-order data element is independent, i.e., the out-of-order dataelement is not related to any other existing record in the temporalgraph, creating a record with the out-of-order data element in thetemporal graph even if the out-of-order data element contains oldertimestamp, does not cause any problem.

However, if the out-of-order data element is part of a temporal graphsuch as a user logging into a network and establishing a connection witha network device, the user logging out, a network device being newlyadded to the network, a device disconnected from the network, a networkservice being made available, a service taken out, etc., then handlingthe out-of-order data element, can become problematic. In all thementioned examples, the out-of-order data element is not an independentrecord, i.e., the out-of-order data element has a relationship withanother record in the temporal graph. For example, a user logging in isan event but is also establishing a connection with a network device. Ifthe user and the network device are stored as vertices in the temporalgraph, then a relationship between the user and the network device,which is called a “connection,” is stored as an edge connecting the uservertex and the network device vertex. Thus, if the user logging eventhappened at time t1 and the streaming data network is currentlyprocessing data belonging to t1+x, where x is a positive value, then theconnection between the user and the network device is not only part of asnapshot of the temporal graph at t1 but also should be part of allsnapshots of the temporal graph at times greater than time t1 such ast2, t3, t4, . . . , and t1+x, if the user is still logged on. Otherwise,the user logging event should be part of all snapshots of the temporalgraph until the user logged out event is handled. If x is a very largenumber, then handling the out-of-order data element of time t1 shouldmodify all snapshots of the temporal graph starting from t1 to t1+x.

In order to do a detailed analysis of the streaming data network, animplementation may store snapshots of the temporal graph for everyrequired point in time. This approach may seem satisfactory for verysmall streaming networks. However, this approach quickly becomesineffective for a practical implementation as the size of streaming datanetworks increases. The implementation that performs the detailedanalysis of the streaming data network by storing all snapshots of thetemporal graph for various points at any given time suffers from twomain deficiencies.

The first deficiency associated with storing all snapshots of thetemporal graph is if an out-of-order data element arrives, which isquite common in streaming data networks, then the temporal graph shouldnot only modify a snapshot for the timestamp to which the out-of-orderdata element belongs but also all other stored snapshots that havetimestamps greater than the timestamp of the out-of-order data element.This can be very time-consuming. Altering several snapshots for theout-of-order data element can render such a scheme completelynon-practical as each snapshot can be linked to some many data pointsthat the processing to handle the volume and complexity of the data inthe temporal graph would be too great.

The second deficiency associated with storing all snapshots of thetemporal graph for any given point in time is that it can causeduplication of records in the temporal graph as the out-of-order dataelement can be part of multiple snapshots of the temporal graph. Thiscan cause space explosion, make the temporal graph unwieldy, and canresult in excessive use of storage space.

The present technology addresses both the above two deficienciesassociated with common practices, but in an efficient and elegantmanner. A key insight is not to store out-of-order data in a snapshotbut just store the out-of-order data as additional data linked to thetemporal graph. By storing the out-of-order data in such a way, dataduplication and excessive utilization of storage space are avoided. Eventhough the out-of-order data is not stored as a snapshot, a snapshot ofthe temporal graph for any given point in time can be materialized withO(1) time complexity—including a snapshot that includes the out-of-orderdata. According to the definition, O(1) time complexity means that thecomplexity is the same, regardless of the size of temporal graph, toretrieve any snapshot for any given point in time.

The present technology associates two timestamps with each data element.A first timestamp is called “ModificationTime” and second timestamp iscalled “NextModificationTime”. Every vertex in the temporal graph thatrepresents a data element has a unique ID. For the same data element(and vertex), the ID does not change. For example, for a given user theassociated ID is the same. Therefore, if the user signs in, then signsout, and again signs in, every time the same ID is used for the user.

As an example, when a user signs in for the first time to a network atimestamp is assigned to the sign-in action of the user. A user vertexis created in a temporal graph of the network to represent the user. Theuser vertex is given a ModificationTime that matches timestamp of thesign-in action of the user, and the user vertex is given aNextModificationTime set to a very large value (hereinafter MAX_TIME)since the NextModificationTime is undefined at this moment the currentdata is written to the temporal graph. If a vertex is already present inthe temporal graph of the network that represents the user, then thereis no need to create a new vertex in the temporal graph.

A new vertex is also created in the temporal graph to represent anetwork device to which the user signs in. If a vertex representing thenetwork device is already present in the temporal graph, then there isno need for creation of a new vertex in the temporal graph to representthe network device. After creation of the network device vertex in thetemporal graph, the network device vertex is given a ModificationTimethat is set to be the timestamp of the sign-in action of the user, andthe NextModificationTime is set to be MAX_TIME.

After creating the network device vertex, an edge is also created in thetemporal graph, connecting the user vertex and the network devicevertex, ModificationTime of the edge is set to the timestamp of thesign-in action of the user and NextModificationTime of the edge is setto MAX_TIME.

If the user wants to sign out from the network, then only the sign-outaction of the user must be handled as the vertices representing the userand the network device are already present in the temporal graph. Tohandle the sign-out action of the user, where a timestamp is assignedthereto, the edge connecting the user vertex and the network devicevertex is fetched from the temporal graph, where NextModificationTime ofthe fetched edge is equal to MAX_TIME. Then, NextModificationTime of thefetched edge is updated to reflect the timestamp of the sign-out actionof the user. Then a new edge is created in the temporal graph to connectthe user vertex and the network device vertex, “EntryStatus” of thecreated edge is set as “Deleted” (marking the sign-out action of theuser), ModificationTime of the created edge is set to the timestamp ofthe sign-in action of the user, and NextModificationTime of the creatededge is set to MAX_TIME.

If the user signs in to the network device for the second time, thenthere is no need to create a new user vertex and a new network devicevertex in the temporal graph as the user vertex and the network devicevertex are already present in the temporal graph.

The edge connecting the user vertex and the network device vertex isfetched, where NextModificationTime of the fetched edge is equal toMAX_TIME. This action retrieves the edge representing the sign-outaction of the user (its “EntryStatus” field is marked as “Deleted”).NextModificationTime of the fetched edge is updated to the timestamp ofthe sign-out action of the user. Then a new edge connecting the uservertex and the network device vertex is created, ModificationTime of thecreated edge is set to the timestamp of the sign-in action of the userfor the second time, and NextModificationTime of the created edge is setto MAX_TIME.

The above explanation describes an example of updating existing recordsin a temporal graph and creating new records, according to someembodiments of the present technology. A graph element can represent anon-temporal data element or a temporal data element in a temporalgraph. Non-temporal data elements are data elements that do not changeover time, such as a user or a network. In contrast, temporal dataelements are data elements that can change over time. There can be onlyone representation for a graph element, representing a non-temporal dataelement, in a temporal graph. However, for a graph element, representinga temporal data element, the following actions are followed. First,NextModificationTime of the latest entry to the temporal graph is set toa timestamp of a current action and a new graph element representing thecurrent action is created. Then, ModificationTime of the created graphelement is set to the timestamp of the current action andNextModificationTime of the created graph element is set to MAX_TIME.The temporal data element can be sign-in/sign-out actions, link up/linkdown events, metric readings at frequent intervals such as memory usage,CPU usage, bandwidth usage, service request count, client count, etc.

To represent a temporal data element in a temporal graph of a network,an existing record of the temporal data element (if any) representingthe latest version of the temporal data element is updated(NextModificationTime of the existing record is set to the timestamp ofthe temporal data element). Then a new record representing the temporaldata element or the latest version of the temporal data element iscreated (NextModificationTime is set to MAX_TIME). Therefore, an extracomputing cost is introduced through processes of (1) fetching theexisting record of the temporal data element in the temporal graph and(2) updating the existing record before creating a new version of thetemporal data in the temporal graph. However, benefits arise whilereading data from the temporal graph, which is extremely important fordoing real-time data analysis of the temporal graph. Benefits outclassthe introduced cost of the above processes.

According to some embodiments of this disclosure, reading a temporalgraph is extremely simple and extremely fast. Fetching of the currentsnapshot can be done by using the following query:

SELECT * from DB WHERE NextModificationTime=“MAX_TIME”

Fetching of snapshot for any given point in time, say “t”, can beretrieved using the following query:

SELECT * from DB WHERE ModificationTime<=“t” andNextModificationTime>“t”

Thus, a snapshot for any given point in time is materialized quicklywithout actually storing the snapshots. Hence the two main deficienciesassociated with commonly used methods that store snapshots of thetemporal graph at any given point in time are completely avoided. Thetwo problems of out-of-order processing of data and excessive storagespace requirement due to data duplication as the same data element couldbe part of multiple snapshots.

When a temporal data element is processed out-of-order by the presenttechnology, the temporal data element not only instantly becomes part ofthe snapshot of timestamp of the temporal data element, but alsoinstantly becomes part of all snapshots whose timestamps are greater.

Since snapshots are not explicitly stored, there is no data duplication,which leads to optimal usage of storage space. Read operations executeat O(1) time complexity.

In accordance to some embodiments of the present technology, everyrepresentation of a data element stored in a temporal graph uses notjust one timestamp but uses two timestamps: ModificationTime andNextModificationTime.

The latest snapshot of the temporal graph could be retrieved by fetchingall representation of data elements whose NextModificationTime fieldsequals MAX_TIME.

Snapshot for any specified time “t” could be retrieved by fetching allelements in the temporal graph whose ModificationTime is less than orequal to “t” and NextModificationTime is greater than “t”. This capturesboth data modified at the specified time “t” and data that was modifiedprior to the specified time “t”, but that was not updated until afterthe specified time “t” and is therefore data belonging to the requestedsnapshot.

If the data element arrives, for example represented by a vertex thatcontains a very old timestamp (out-of-order), it is not a problem ifthat data element is the latest version of that particular vertex. Thatmeans if a previous version of the vertex already exists in the temporalgraph and the latest version of the vertex existing in the temporalgraph contains a timestamp that is less than the timestamp of the dataelement, then there is no problem and all the explanation provided aboveare enough.

However, if the temporal graph already contains one or morerepresentations of the data element that are much newer than the dataelement, then this out-of-order problem has to be specifically handledwhich is explained in detail below.

FIG. 1 shows an example for possible scenarios for inserting new dataelement in a temporal graph.

FIG. 1 illustrates different scenarios for pre-existing representationsin the form of vertex or a data element at different timestamps. FIG. 1shows vertex 104 at a time t1 that has ModificationTime andNextModificationTime of t1 and t2, respectively. The vertex 106 at timet2 has ModificationTime and NextModificationTime of t2 and t3,respectively. Also in FIG. 1, the vertex 110 at time t3 hasModificationTime and NextModificationTime of t3 and t4, respectively,and the vertex 114 at time t4 has ModificationTime andNextModificationTime of t4 and ∞, respectively.

FIG. 1 also illustrates different scenarios for insertion of a new dataelement in a temporal graph. A vertex 102 represents scenario B, avertex 108 represents scenario C, a vertex 112 represents scenario D, avertex 116 represents scenario E, and a vertex 118 represents scenarioA. Description of scenarios A, B, C, D, and E are as follows.

As stated above and according to some aspects of the present technology,an out-of-order data packet needs to be handled effectively in astreaming data network. By using the below query, any new data elementcan be checked to determine if an existing version of the vertex alreadyexists in the temporal graph, and whether the new data element isarriving out-of-order from data already existing in the temporal graph.Assume that a new data element with timestamp t2, which should berepresented by a vertex in the temporal graph, is received. At least oneprocessor responsible for writing new data to the temporal graphdetermine a result to the following query:

SELECT * from DB

WHERE ID=‘VertexId’ AND NextModificationTime>‘t2’

ORDER BY NextModificationTime ASCENDING

LIMIT 1

The above query can yield five different kinds of results (scenarios A,B, C, D, and E) that are described as follows and with referring to FIG.1.

According to a first scenario, the above query retrieves no existingrecord of the new data element in the temporal graph. This indicatesthat no previous record or later record exists for the new data element,and the new data element is the very first version and can be insertedinto the temporal graph normally (scenario A represented by vertex 118in FIG. 1).

According to a second scenario, the above query retrieves an existingrecord, where ModificationTime of the existing record is t1, which isless than t2, and NextModificationTime of the existing record isMAX_TIME. This result shows that the new data element is not arrivingout-of-order and can be processed in order. In this case, the existingrecord is updated such that NextModificationTime of the existing recordis updated to t2 and ModificationTime of the existing record is kept tobe t1. Also, a new record with the new data element is created in thetemporal graph to represent the new data element, ModificationTime ofthe new record is set to t2, and NextModificationTime of the new recordis set to MAX_TIME (scenario E represented by vertex 116 in FIG. 1).

According to a third scenario, the above query retrieves an existingrecord, where ModificationTime of the existing record is t2, which isthe same as timestamp t2 of the new data. This happens if the same datais being reported more than once or deliberately the existing record isbeing updated. As per the system-wide setting, the new data element canbe ignored by treating the new data element as duplicate or informationof the new data element can be merged with the existing record and theexisting record can be updated. The important thing to note in this caseis that both ModificationTime and NextModificationTime fields of theexisting record are not touched. However, if data of the existing recordand the new data element are the same without any change, then the newdata element can be ignored (scenario D represented by vertex 112 inFIG. 1).

According to a fourth scenario, the above query retrieves an existingrecord, where ModificationTime of the existing record is t1, which isless than the new data's timestamp t2 and NextModificationTime of theexisting record is t3, which is greater than the new data's timestampt2. This is the most complex case of all the scenario discussed hereinand highlights the classic handling out-of-order data problem. In thiscase, record for t1 exists and records for t3, t4, t5 and so on can alsoexist. This means that the temporal graph contains both previous recordsas well as later records of the new data element. For the existingrecord, NextModificationTime is updated from t3 to t2 whileModificationTime of the existing record is kept to be t1. Also, a newrecord with the new data element is created, where ModificationTime ofthe new record is set to t2 and NextModificationTime of the new recordis set to t3. It is to be noted that t3 is obtained from the existingrecord. Thus, the new data element is stitched properly in between thealready existing records of time t1 and t2. It is immaterial if it isjust one later version t3 exists or many later versions such t3, t4, t5and so on exist (scenario C represented by vertex 108 in FIG. 1).

According to a fifth scenario, the above query retrieves an existingrecord, where ModificationTime of the existing record is t3, which isgreater than timestamp of the new data element: t2. In this case, valueof NextModificationTime of the existing record is irrelevant. Thisindicates that the temporal graph does not contain any previous recordsof the new data element. However, the temporal graph contains one ormore newer records of the new data element and the new data element isan earlier version of that needs to be processed out-of-order. In thiscase, there exists no previous record to be updated. A new record withthe new data element is created, where ModificationTime of the newrecord is set to t2 and NextModificationTime of the new record is set tot3, which is the value obtained from ModificationTime of the existingrecord (scenario B represented by vertex 102 in FIG. 1).

Therefore, during insertion time into the temporal graph, a query ismade to process every new data element, an existing record is updated(scenarios 2, 3, 4 mentioned above) or no existing record is updated(scenarios 1 and 5 mentioned above) and a new record with the new dataelement is created and inserted in the temporal graph.

FIG. 2 shows completed insertion of a new data element into a temporalgraph. In FIG. 2, vertex 102, representing scenario B in FIG. 1, hasbeen placed in the temporal graph, where ModificationTime andNextModificationTime of vertex 102 are set to t0.x and t1, respectively.Vertex 104 that was shown in FIG. 1, is also illustrated in FIG. 2.Also, vertex 106 that was shown in FIG. 1, has been updated in FIG. 2,where ModificationTime and NextModificationTime of vertex 106 in FIG. 2are t2 and t2.x, respectively.

FIG. 2 shows vertex 106 of FIG. 1 but with updated timestamps, whereModificationTime and NextModificationTime of vertex 106 in FIG. 2 havebeen set to t2 and t2.x, respectively. Vertex 108 that denotes scenarioC in FIG. 1 has been inserted in the temporal graph in FIG. 2, whereModificationTime and NextModificationTime of vertex 108 in FIG. 2 havebeen set to t2.x and t3, respectively. FIG. 2 also illustrates vertex110 of FIG. 1 with ModificationTime and NextModificationTime of t3 andt4, respectively. Vertex 112 that denotes scenario D in FIG. 1 has beeninserted in the temporal graph in FIG. 2, where ModificationTime andNextModificationTime of vertex 112 in FIG. 2 have been set to t4 andt4.x, respectively. Vertex 116 in FIG. 1 that denotes scenario E hasbeen added to FIG. 2, where ModificationTime and NextModificationTime ofvertex 116 are listed as t4.x and ∞, respectively.

In some embodiments, the proposed technology allows for maintainingchanges made to a temporal graph, retrieving a snapshot of the entiretemporal graph given any point in time using O(1) time complexity,efficiently using storage space by not having to store any snapshotexplicitly, and efficiently and correctly handling out-of-order arrivalof a new data element in a streaming data network.

FIG. 3 is a flowchart depicting a method 300, run by a computing systemhaving at least one processor for carrying out the steps of the methodfor inserting a new data element in a temporal graph. The method 300 isdescribed with respect to FIG. 1, according to some embodiments of thepresent technology. While reference is made to multiple figures, nolimitation from one figure should be imputed to other figures. Nolimitations is intended except as otherwise indicated in the appendedclaims.

The method 300 starts from step 302, where the computing system receives(302) the new data element with timestamp t. Then the computing systemsearches (304) for an existing record of the new data element in thetemporal graph, where NextModificationTime of the existing record isgreater than timestamp t of the new data element. The computing systemchecks (306) to see if it finds any existing record of the new dataelement in the temporal graph. If the computing system does not find anyexisting record of the new data element, which means that there isneither previous record nor later record of the new data element in thetemporal graph, the computing system creates (326) a new record with thenew data element in the temporal graph, sets NextModificationTime of thenew record equal to MAX_TIME, and inserts the new record. Step 326 inFIG. 3 corresponds to scenario A 118 in FIG. 1.

If the computing system finds an existing record in the temporal graph,the computing system checks (308) to see if both of these criteria aresimultaneously satisfied: timestamp t of the new data element is greaterthan ModificationTime of the existing record and NextModificationTime ofthe existing record is set to MAX_TIME. If both criteria aresimultaneously satisfied, then the computing system creates a new recordwith the new data element in the temporal graph, sets (310)NextModificationTime of the existing record to timestamp t of the newdata element, updates the existing record, sets NextModificationTime ofthe new record equal to MAX_TIME, and inserts the new record in thetemporal graph. Step 310 in FIG. 3 corresponds to scenario E 116 in FIG.1.

If the computing system finds that the two conditions in step 308 arenot satisfied simultaneously, the computing system checks (312) to seeif timestamp t of the new data element is equal to ModificationTime ofthe existing record in the temporal graph. If timestamp t of the newdata is equal to ModificationTime of the existing record in the temporalgraph, the computing system merges the new data element into theexisting record. The computing system makes no change inModificationTime and NextModificationTime of the existing record. Step314 in FIG. 3 corresponds to scenario D 112 in FIG. 1.

At step 312, if the computing system finds that timestamp t of the newdata element is not equal to ModificationTime of the existing record,the computing system checks (316) to see if timestamp t of the new dataelement is greater than ModificationTime of the existing record andNextModificationTime of the existing record is not equal to MAX_TIME. Ifthe computing system finds that timestamp t of the new data element isgreater than ModificationTime of the existing record andNextModificationTime of the existing record is not equal to MAX_TIME,then the computing system creates a new record with the new data elementin the temporal graph, sets (318) NextModificationTime of the new recordequal to NextModificationTime of the existing record, inserts the newrecord in the temporal graph, sets NextModificationTime of the existingrecord equal to timestamp t, and updates the existing record. Step 318in FIG. 3 corresponds to scenario C 108 in FIG. 1.

At step 316, if the computing system finds that two conditions: (1)timestamp t of the new data element is greater than ModificationTime ofthe existing record and (2) NextModificationTime of the existing recordis not equal to MAX_TIME are not concurrently satisfied, the computingsystem checks (320) to see if timestamp t of the new data element islesser than the ModificationTime of the existing record. If thetimestamp t of the new data element is lesser than the ModificationTimeof the existing record, then the computing system creates a new recordwith the new data element in the temporal graph, sets (322)NextModificationTime of the new record equal to ModificationTime of theexisting record and inserts the new record. Step 322 in FIG. 3corresponds to scenario B 102 in FIG. 1.

At step 320, if the computing system finds that timestamp t of the newdata element is not lesser than the ModificationTime of the existingrecord, the computing system stops (324) and does not do any furtheroperation.

FIG. 4 illustrates an example a network device 400 (e.g., switch,router, network appliance, etc.). The network device 400 can include amaster central processing unit (CPU) 402, interfaces 404, and a bus 406(e.g., a PCI bus). When acting under the control of appropriate softwareor firmware, the CPU 402 can be responsible for executing packetmanagement, error detection, and/or routing functions. The CPU 402preferably accomplishes all these functions under the control ofsoftware including an operating system and any appropriate applicationssoftware. The CPU 402 may include one or more processors 408 such as aprocessor from the Motorola family of microprocessors or the MIPS familyof microprocessors. In an alternative embodiment, the processor 408 canbe specially designed hardware for controlling the operations of thenetwork device 400. In an embodiment, a memory 410 (such as non-volatileRAM and/or ROM) can also form part of the CPU 402. However, there aremany different ways in which memory could be coupled to the system.

The interfaces 404 can be provided as interface cards (sometimesreferred to as line cards). The interfaces 404 can control the sendingand receiving of data packets over the network and sometimes supportother peripherals used with the network device 400. Among the interfacesthat may be provided are Ethernet interfaces, frame relay interfaces,cable interfaces, DSL interfaces, token ring interfaces, and the like.In addition, various very high-speed interfaces may be provided such asa fast token ring interface, wireless interface, Ethernet interface,Gigabit Ethernet interface, Asynchronous Transfer Mode (ATM) interface,High-Speed Serial Interface (HSSI), Packet Over SONET (POS) interface,Fiber Distributed Data Interface (FDDI), and the like. The interfaces404 may include ports appropriate for communication with the appropriatemedia. In some cases, the interfaces 404 may also include an independentprocessor and, in some instances, volatile RAM. The independentprocessors may control communication intensive tasks such as packetswitching, media control, and management. By providing separateprocessors for the communication intensive tasks, the interfaces 404 mayallow the CPU 402 to efficiently perform routing computations, networkdiagnostics, security functions, and so forth.

Although the system shown in FIG. 4 is an example of a network device ofan embodiment, it is by no means the only network device architecture onwhich the subject technology can be implemented. For example, anarchitecture having a single processor that can handle communications aswell as routing computations and other network functions, can also beused. Further, other types of interfaces and media may also be used withthe network device 400.

Regardless of the network device's configuration, it may employ one ormore memories or memory modules (including the memory 410) configured tostore program instructions for general-purpose network operations andmechanisms for roaming, route optimization, and routing functionsdescribed herein. The program instructions may control the operation ofan operating system and/or one or more applications. The memory ormemories may also be configured to store tables such as mobilitybinding, registration, and association tables.

FIG. 5 shows an example of a computing system architecture 500, whichcan be for example any computing device making up a controller, or awireless access point or any component thereof in which the componentsof the system are in communication with each other using a connection505. The connection 505 can be a physical connection via a bus, or adirect connection into a processor 510, such as in a chipsetarchitecture. The connection 505 can also be a virtual connection,networked connection, or logical connection.

In some embodiments computing system 500 is a distributed system inwhich the functions described in this disclosure can be distributedwithin a datacenter, multiple datacenters, a peer network, etc. In someembodiments, one or more of the described system components representsmany such components each performing some or all of the function forwhich the component is described. In some embodiments, the componentscan be physical or virtual devices.

Example system 500 includes at least one processing unit (CPU orprocessor) 510 and a connection 505 that couples various systemcomponents including system memory 515, such as read only memory (ROM)520 and random access memory (RAM) 525 to processor 510. The computingsystem 500 can include a cache of high-speed memory 512 connecteddirectly with, in close proximity to, or integrated as part of theprocessor 510.

The processor 510 can include any general purpose processor and ahardware service or a software service, such as services 532, 534, and536 stored in a storage device 530, configured to control the processor510 as well as a special-purpose processor where software instructionsare incorporated into the actual processor design. The processor 510 mayessentially be a completely self-contained computing system, containingmultiple cores or processors, a bus, memory controller, cache, etc. Amulti-core processor may be symmetric or asymmetric.

To enable user interaction, the computing system 500 includes an inputdevice 545, which can represent any number of input mechanisms, such asa microphone for speech, a touch-sensitive screen for gesture orgraphical input, keyboard, mouse, motion input, speech, etc. Thecomputing system 500 can also include an output device 535, which can beone or more of a number of output mechanisms known to those of skill inthe art. In some instances, multimodal systems can enable a user toprovide multiple types of input/output to communicate with the computingsystem 500. The computing system 500 can include a communicationsinterface 540, which can generally govern and manage the user input andsystem output. There is no restriction on operating on any particularhardware arrangement and therefore the basic features here may easily besubstituted for improved hardware or firmware arrangements as they aredeveloped.

A storage device 530 can be a non-volatile memory device and can be ahard disk or other types of computer readable media which can store datathat are accessible by a computer, such as magnetic cassettes, flashmemory cards, solid state memory devices, digital versatile disks,cartridges, random access memories (RAMs), read only memory (ROM),and/or some combination of these devices.

The storage device 530 can include software services, servers, services,etc., that when the code that defines such software is executed by theprocessor 510, it causes the system to perform a function. In someembodiments, a hardware service that performs a particular function caninclude the software component stored in a computer-readable medium inconnection with the necessary hardware components, such as the processor510, the connection 505, the output device 535, etc., to carry out thefunction.

For clarity of explanation, in some instances the present technology maybe presented as including individual functional blocks includingfunctional blocks comprising devices, device components, steps orroutines in a method embodied in software, or combinations of hardwareand software.

Any of the steps, operations, functions, or processes described hereinmay be performed or implemented by a combination of hardware andsoftware services or services, alone or in combination with otherdevices. In some embodiments, a service can be software that resides inmemory of a client device and/or one or more servers of a contentmanagement system and perform one or more functions when a processorexecutes the software associated with the service. In some embodiments,a service is a program, or a collection of programs that carry out aspecific function. In some embodiments, a service can be considered aserver. The memory can be a non-transitory computer-readable medium.

In some embodiments the computer-readable storage devices, mediums, andmemories can include a cable or wireless signal containing a bit streamand the like. However, when mentioned, non-transitory computer-readablestorage media expressly exclude media such as energy, carrier signals,electromagnetic waves, and signals per se.

Methods according to the above-described examples can be implementedusing computer-executable instructions that are stored or otherwiseavailable from computer readable media. Such instructions can comprise,for example, instructions and data which cause or otherwise configure ageneral purpose computer, special purpose computer, or special purposeprocessing device to perform a certain function or group of functions.Portions of computer resources used can be accessible over a network.The computer executable instructions may be, for example, binaries,intermediate format instructions such as assembly language, firmware, orsource code. Examples of computer-readable media that may be used tostore instructions, information used, and/or information created duringmethods according to described examples include magnetic or opticaldisks, solid state memory devices, flash memory, USB devices providedwith non-volatile memory, networked storage devices, and so on.

Devices implementing methods according to these disclosures can comprisehardware, firmware and/or software, and can take any of a variety ofform factors. Typical examples of such form factors include servers,laptops, smart phones, small form factor personal computers, personaldigital assistants, and so on. Functionality described herein also canbe embodied in peripherals or add-in cards. Such functionality can alsobe implemented on a circuit board among different chips or differentprocesses executing in a single device, by way of further example.

The instructions, media for conveying such instructions, computingresources for executing them, and other structures for supporting suchcomputing resources are means for providing the functions described inthese disclosures.

Although a variety of examples and other information was used to explainaspects within the scope of the appended claims, no limitation of theclaims should be implied based on particular features or arrangements insuch examples, as one of ordinary skill would be able to use theseexamples to derive a wide variety of implementations. Further andalthough some subject matter may have been described in languagespecific to examples of structural features and/or method steps, it isto be understood that the subject matter defined in the appended claimsis not necessarily limited to these described features or acts. Forexample, such functionality can be distributed differently or performedin components other than those identified herein. Rather, the describedfeatures and steps are disclosed as examples of components of systemsand methods within the scope of the appended claims.

The invention claimed is:
 1. A non-transitory computer readable mediumcomprising instructions stored thereon, the instructions are effectiveto cause at least one processor to: receive new data pertaining to agraph element in a temporal graph, the temporal graph comprisingdifferent types of graph elements including vertices and edges, forstoring information of a computer network; determine that the temporalgraph already stores second data for the graph element having atimestamp denoting a second time, wherein the new data was recorded at afirst time that is the same or earlier than the second time; and insertthe new data into the temporal graph by recording data for the graphelement in a temporal graph database with a timestamp for the new datadenoting the first time and a next modification time for the new datathat denotes the second time.
 2. The non-transitory computer readablemedium of claim 1, comprising further instructions that are effective tocause the at least one processor to: prior to the insertion of the newdata into the temporal graph, determine that the temporal graph alreadystores third data for the graph element having a timestamp for the thirddata denoting a third time and that has a next modification time for thethird data that denotes the second time, wherein the first time that isassociated with the new data is after the third time, but prior to thesecond time; and update the next modification time for the third data todenote the first time.
 3. The non-transitory computer readable medium ofclaim 1, wherein the determination that the temporal graph alreadystores second data for the graph element having a timestamp denoting asecond time involves determining that the new data is earlier than anytimestamp associated with data for the graph element in the temporalgraph.
 4. The non-transitory computer readable medium of claim 1,comprising further instructions that are effective to cause the at leastone processor to: determine that the first time equals the second time,and thereby no update to the second data is necessary.
 5. Thenon-transitory computer readable medium of claim 1, comprising furtherinstructions that are effective to cause the at least one processor to:receive a request to produce a snapshot of a portion of the temporalgraph, wherein the request identifies one or more data elements and aspecified time for which to produce the snapshot; and search thetemporal graph for all data that has a modification time less than orequal to the specified time coupled with a next modification timegreater than the specified time.
 6. The non-transitory computer readablemedium of claim 1, comprising further instructions that are effective tocause the at least one processor to: receive a request to produce acurrent snapshot of a portion of the temporal graph, wherein the requestidentifies one or more data elements; and search the temporal graph forall data that has a next modification time set to the maximum value. 7.The non-transitory computer readable medium of claim 1, wherein each ofthe vertices represent at least one of interconnecting devices in thecomputer network or metric elements representing operational informationrelated to the interconnecting devices.
 8. The non-transitory computerreadable medium of claim 1, wherein each of the edges represent arelationship between interconnecting devices in the computer network. 9.A method: receiving new data pertaining to a graph element in a temporalgraph, the temporal graph comprising different types of graph elementsincluding vertices and edges, for storing information of a computernetwork; determining that the temporal graph already stores second datafor the graph element having a timestamp denoting a second time, whereinthe new data was recorded at a first time that is the same or earlierthan the second time; and inserting the new data into the temporal graphby recording data for the graph element in a temporal graph databasewith a timestamp for the new data denoting the first time and a nextmodification time for the new data that denotes the second time.
 10. Themethod of claim 9, comprising: prior to the insertion of the new datainto the temporal graph, determining that the temporal graph alreadystores third data for the graph element having a timestamp for the thirddata denoting a third time and that has a next modification time for thethird data that denotes the second time, wherein the first time that isassociated with the new data is after the third time, but prior to thesecond time; and update the next modification time for the third data todenote the first time.
 11. The method of claim 9, wherein thedetermination that the temporal graph already stores second data for thegraph element having a timestamp denoting a second time involvesdetermining that the new data is earlier than any timestamp associatedwith data for the graph element in the temporal graph.
 12. The method ofclaim 9, comprising: determining that the first time equals the secondtime, and thereby no update to the second data is necessary.
 13. Themethod of claim 9, comprising: receiving a request to produce a snapshotof a portion of the temporal graph, wherein the request identifies oneor more data elements and a specified time for which to produce thesnapshot; and searching the temporal graph for all data that has amodification time less than or equal to the specified time coupled witha next modification time greater than the specified time.
 14. The methodof claim 9, comprising: receiving a request to produce a currentsnapshot of a portion of the temporal graph, wherein the requestidentifies one or more data elements; and searching the temporal graphfor all data that has a next modification time set to a maximum value.15. A system comprising: at least one non-transitory computer readablemedium comprising instructions stored thereon; and at least oneprocessor effective to executing the instructions such that whenexecuted the instructions are effective to cause at least one processorto: receive new data pertaining to a graph element in a temporal graph,the temporal graph comprising different types of graph elementsincluding vertices and edges, for storing information of a computernetwork; determine that the temporal graph already stores second datafor the graph element having a timestamp denoting a second time, whereinthe new data was recorded at a first time that is the same or earlierthan the second time; and insert the new data into the temporal graph byrecording data for the graph element in a temporal graph database with atimestamp for the new data denoting the first time and a nextmodification time for the new data that denotes the second time.
 16. Thesystem of claim 15, comprising further instructions that are effectiveto cause the at least one processor to: prior to the insertion of thenew data into the temporal graph, determine that the temporal graphalready stores third data for the graph element having a timestamp forthe third data denoting a third time and that has a next modificationtime for the third data that denotes the second time, wherein the firsttime that is associated with the new data is after the third time, butprior to the second time; and update the next modification time for thethird data to denote the first time.
 17. The system of claim 15, whereinthe determination that the temporal graph already stores second data forthe graph element having a timestamp denoting a second time involvesdetermining that the new data is earlier than any timestamp associatedwith data for the graph element in the temporal graph.
 18. The system ofclaim 15, comprising further instructions that are effective to causethe at least one processor to: determine that the first time equals thesecond time, and thereby no update to the second data is necessary. 19.The system of claim 15, comprising further instructions that areeffective to cause the at least one processor to: receive a request toproduce a snapshot of a portion of the temporal graph, wherein therequest identifies one or more data elements and a specified time forwhich to produce the snapshot; and search the temporal graph for alldata that has a modification time less than or equal to the specifiedtime coupled with a next modification time greater than the specifiedtime.
 20. The system of claim 15, comprising further instructions thatare effective to cause the at least one processor to: receive a requestto produce a current snapshot of a portion of the temporal graph,wherein the request identifies one or more data elements; and search thetemporal graph for all data that has a next modification time set to amaximum value.